package AgentTravel.LogicObjects;

import java.io.Serializable;
import java.util.Date;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

import org.joda.time.LocalDate;

public class DayPlanCalendar implements Serializable 
{
	public DayPlanCalendar()
	{
		
	}
	
	private Map<LocalDate,DayPlan> dayPlans=new Hashtable<LocalDate,DayPlan>();
	
	public DayPlan GetDayPlan(LocalDate day)
	{
		if(dayPlans.containsKey(day))
			return dayPlans.get(day);
		else
			return new DayPlanFree();
	}
	
	public boolean Contains(LocalDate day)
	{
		return dayPlans.containsKey(day);
	}
	
	public void SetDayPlan(LocalDate day, DayPlan plan)
	{
		dayPlans.put(day, plan);
	}
	
	public Iterator<Entry<LocalDate, DayPlan>> getIterator()
	{
		return dayPlans.entrySet().iterator();
	}
} 
